package cn.edu.scau.cmi.suwenpeng.comprehensive;

import java.io.Serializable;

@SuppressWarnings("serial")
public class Courses implements Serializable {

	// private String idOfCourse;
	String nameOfCourse;
	String nameOfTeacher;
	double attendence;
	double test;
	double homework;
	double finalExam;

	public Courses() {
		super();
	}

	public Courses(String nameOfCourse, String nameOfTeacher, double attendence, double test,
			double homework, double finalExam) {
		// this.idOfCourse = idOfCourse;
		this.nameOfCourse = nameOfCourse;
		this.nameOfTeacher = nameOfTeacher;
		this.attendence = attendence;
		this.test = test;
		this.homework = homework;
		this.finalExam = finalExam;
	}

	public double getTotalScore() {
		double totalScore = attendence + test + homework + finalExam;
		return totalScore;
	}

	public double getAttendence() {
		return attendence;
	}

	public void setAttengense(double attendence) {
		this.attendence = attendence;
	}

	public double getTest() {
		return test;
	}

	public void setTest(double test) {
		this.test = test;
	}

	public double getHomework() {
		return homework;
	}

	public void setHomework(double homework) {
		this.homework = homework;
	}

	public double getFinalExam() {
		return finalExam;
	}

	public void setFinalExam(double finalExam) {
		this.finalExam = finalExam;
	}

	// public String getIdOfCourse() {
	// return idOfCourse;
	// }
	//
	// public void setIdOfCourse(String idOfCourse) {
	// this.idOfCourse = idOfCourse;
	// }

	public String getNameOfCourse() {
		return nameOfCourse;
	}

	public void setNameOfCourse(String nameOfCourse) {
		this.nameOfCourse = nameOfCourse;
	}

	public String getnameOfTeacher() {
		return nameOfTeacher;
	}

	public void setNameOfTeacher(String nameOfTeacher) {
		this.nameOfTeacher = nameOfTeacher;
	}

	public String toString() {
		String str = nameOfCourse + "\t" + nameOfTeacher + "\t" + String.valueOf(attendence) + "\t"
				+ String.valueOf(test) + "\t" + String.valueOf(homework) + "\t" + String.valueOf(finalExam) + "\t"
				+ String.valueOf(getTotalScore());
		return str;

	}
}
